<?php
if(isset($_SESSION['Allyfolio_User_ID']) && $_SESSION['Allyfolio_User_ID']!="" && $_SESSION['Allyfolio_User_ID']>0)
{
	$strSQL = "update af_users set Last_Activity = '".time()."', Login_Status = 'PC Login' where User_ID='".$_SESSION['Allyfolio_User_ID']."'";
	$pdodbobj->query($strSQL,array());
}

if(!isset($_SESSION['Allyfolio_User_ID']) || (isset($_SESSION['Allyfolio_User_ID']) && $_SESSION['Allyfolio_User_ID']=="" ))
{
    ?>
    <script>
        window.location='index.php';
    </script>
    <?php
    exit;
}
else
{
    $userinfo=$pdodbobj->fetch_array($pdodbobj->query("select Allyfolio_User_ID from af_users where User_ID=:userid",array(":userid"=>$_SESSION['Allyfolio_User_ID'])));
    
}

?>
<!-- for lightbox -->
<link rel="stylesheet" href="css/lightbox.css">
<!-- for lightbox ends-->	

<link type="text/css" href="cometchat/cometchatcss.php" rel="stylesheet" charset="utf-8">
<script type="text/javascript" src="cometchat/cometchatjs.php" charset="utf-8"></script>
<script type="text/javascript" language="javascript">// <![CDATA[

function showHideTopSettings() {

    var ele = document.getElementById("showHideDiv");

    if(ele.style.display == "block") {

            ele.style.display = "none";

      }

    else {

        ele.style.display = "block";

    }

}

// ]]></script>
<!--=================Header Start=======================-->
	<div class="wrapper row1">
	<div class="header" >
    	<?php
        if(isset($_SESSION['Allyfolio_User_ID']) && $_SESSION['Allyfolio_User_ID']!="" && $_SESSION['Allyfolio_User_ID']!=0)
        {
        ?>
        <div class="log_button" >
            <table width="744" border="0" style="margin-top:5px;">

    			<tr>
    
    				<td width="24">
    
    					<a href="javascript:void(0);" onclick="return showHideTopSettings();"><img src="images/navico_1.png" /></a>				</td>
                        <div class="set_list" id="showHideDiv" style="display:none;position: absolute;padding-top: 57px;">

                			<ul style="background-color:white">
                
                				<li><a href="userinfo_settings.php">Settings</a></li>
                
                				<li>Report a Problem</li>
                
                				<li><a href="help.php">Help</a></li>
                
                				<li><a href="logout.php">Logout</a></li>
                
                			</ul>
                
                		</div>
    				<td width="36">
    
    					<a href="pagelist.php?t=<?php echo $userinfo[0]['Allyfolio_User_ID']; ?>"><img src="images/navico_2.png" /></a>				</td>
    
    				<td width="26">
    
    					<a href="techno.php?t=<?php echo $userinfo[0]['Allyfolio_User_ID']; ?>"><img src="images/navico_3.png" /></a>				</td>
    
    				<td width="30">
    
    					<a href="#"><img src="images/navico_4.png" /></a>				</td>
    
    					<td width="594">
    
    					<ul class="dn_txt3">
    
    						<li><img src="images/dna_txt_right.png" /></li>
    
    						<li><input type="text" class="dna_txt2" id="homesearch" /></li>
    
    						<li><img src="images/dna_txt_left.png" /></li>
    
    					</ul>
    
    					
    
    					</td>
    
    			</tr>
    
    		  </table>
    	
        </div>
        <?php
        }
      
        ?>
        <a href="home.php" class="logo"></a>
    </div>
    <div class="clearfix"></div>  
    
    
    </div>
    <div class="clearfix"></div>
    <!--=================Header end=======================-->